package com.yc.framework.aspect;

import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.AfterThrowing;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

@Aspect
@Component
public class LoginLogAspect {

    // 切入点：拦截登录，记录日志
    @Pointcut()
    public void loginPointcut() {}


    // 异常通知：捕获登录异常，获取登录用户信息
    @AfterThrowing(pointcut = "loginPointcut()", throwing = "ex")
    public void logLoginFailure(JoinPoint joinPoint, Exception ex) {

    }
}
